package conf

import (
	"os"
	"path/filepath"

	"github.com/go-ini/ini"
)

var (
	cfg *ini.File
)

func GetConf() *ini.File {
	currentPath, _ := os.Getwd()
	configPath := filepath.Join(currentPath, "conf", "app.ini")
	var err error
	cfg, err := ini.Load(configPath)
	if err != nil {
		panic(err)
	}
	return cfg
}
